﻿#ifndef SAVEIMGWORKER_H
#define SAVEIMGWORKER_H
#include <QObject>
#include <QRect>

#include <Common/common.h>

class SaveImgWorker : public QObject
{
    Q_OBJECT
public:
    explicit SaveImgWorker(QObject *parent = nullptr);
    ~SaveImgWorker();

    void saveFrameAsJPEG(const CFrameInfo& frameInfo);
    int getCameraID(QString cameraKey);
public slots :
    void Initialize();
    void handleFrame(CFrameInfo frameInfo);
    void woodFrame(CFrameInfo frameInfo);
public:
    CameraSw m_cSave;
    int m_nIndex;
    int m_nIndexM;
public:
    // 添加ROI区域
    QRect m_roi;

    // 添加ROI设置函数
    void setRoi(const QRect& roi);
};

#endif // SAVEIMGWORKER_H
